﻿@model MyWorkBlogMVC.Models.EditUserPostWithCommentModel
@{
    ViewBag.Title = "Delete/edit Post";
}
@Styles.Render("~/Content/css")

<link href="~/Content/UserPages.css" rel="stylesheet" />
<div class="jumbotron">
    <img src="~/Content/blogme.PNG" />
</div>

<div class="title"><h2>Delete/edit blogpost</h2></div>
<br />
<div class="body_wrapper">
    <div class="content">

        <h2>@Model.BlogPosts.PostTitle</h2>
        <div>@Model.BlogPosts.PostContent</div>
        <div class="modifyDiv">
            @if (Model.BlogPosts.LastModifyDate != Model.BlogPosts.PostDate)
            {
                <text> Edited:</text> @Model.BlogPosts.LastModifyDate
            }
        </div>
        <hr/>
        @using (Html.BeginForm())
        {
            <input type="submit" value="Delete Post" onclick="return confirm('Are you sure you want to delete this post?');" />
        }
        <br />
        @Html.ActionLink("Edit post", "EditPost", new { id = Model.BlogPosts.BlogPostId })
        
    </div>
</div>